Announcement

Collapse
No announcement yet.

Logical Operator OR ( || )

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Logical Operator OR ( || )

    little confused on correct usage of (OR) operator.

    trying to make following test:

    if (today's close = yesterday's close OR
    today's close -1 = yesterday's close)....continue code

    if (close() = close(-1) || close()-1 = close(-1))
    generates formula error

    what am i missing?

  • #2
    if (close() == close(-1) || close()-1 == close(-1))

    is the correct syntax

    Comment


    • #3
      thanks dloomis & alexis
      that solved my problem.
      peter

      Comment


      • #4
        Not very often i post quicker than my friend Alex, even rarer when i have the right answer, glad to have helped.

        Happy New Year to you both.

        Comment


        • #5
          hello dloomis,
          i make a living trading...if i knew more about .efs programing i'd be able to travel more...life is good. thanks for the quick response.
          have a great day,
          peter.

          Comment


          • #6
            How many OR conditions can be put into a single statement?
            Would this example be correct?
            If (condition A) || (condition B) || (condition C) || etc.
            OpaBert

            Comment


            • #7
              OpaBert
              I am not aware of a limitation in the number of conditions you can OR
              As to your example it is not correct and should be
              if (condition A || condition B || condition C || etc)
              Alex


              Originally posted by OpaBert
              How many OR conditions can be put into a single statement?
              Would this example be correct?
              If (condition A) || (condition B) || (condition C) || etc.

              Comment

              Working...
              X